﻿@model IEnumerable<LabChecker.Models.TestCase>
@{
    var task = (LabChecker.Models.Task)ViewBag.Task;
}
@{
    ViewBag.Title = task.Description.Title;
}
<h2>@Html.ActionLink("Subjects", "Index", "Subject")
    -> @Html.ActionLink(task.Subject.Name, "Index", "Task", new { subjectId = task.Subject.Id }, null)
    -> @task.Description.Title
</h2>
<table>
    <tr>
        <th>
        </th>
        <th>
            #
        </th>
        <th>
            Input
        </th>
        <th>
            Answer
        </th>
        <th>
            IsExample
        </th>
        <th>
            ErrorMessage
        </th>
        <th>
        </th>
    </tr>
    @foreach (var item in Model)
    {
        <tr>
            <td>
                @Html.ActionLink(" ", "Edit", new { id = item.Id }, new { @class = "edit_link" })
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.Index)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.Input)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.Answer)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.IsExample)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.ErrorMessage)
            </td>
            <td>
                @Html.ActionLink(" ", "Delete", new { id = item.Id }, new { @class = "delete_link" })
            </td>
        </tr>
    }
</table>
@*<p>
    @Html.ActionLink("Create New", "Create")
</p>*@
